package com.work.cos.mapper.base;

import org.apache.ibatis.annotations.Param;
import com.work.cos.domain.entity.VerCodeLogEntity;
import com.work.cos.mapper.base.BaseMapper;

public interface IVerCodeLogMapper extends BaseMapper<VerCodeLogEntity, Long>{

	/**
	 * 获取最新的验证码
	 * @param phone
	 * @return
	 */
	String getVerCodeNow(@Param("phone")Long phone,@Param("startTime")String startTime,
			@Param("endTime")String endTime);
	
	/**
	 * 查询验证码数量(电话)
	 * @param phone
	 * @return
	 */
	int getVerCodeCountByMobile(@Param("phone")String phone,@Param("startTime")String startTime,
			@Param("endTime")String endTime);
	
	/**
	 * 验证验证码是否存在
	 * @param phone
	 * @param code
	 * @return
	 */
	int getVerCode(@Param("phone")String phone ,@Param("code")String code);
}
